package 创建者模式.原型模式.ps_ShallowCopy;

/**
 * @Description TODO
 * @Author shallow
 * @Date 2023/3/4 12:32
 */

public class test {
    public static void main(String[] args) throws CloneNotSupportedException {
        Citation citation = new Citation();
        Student stu = new Student();
        stu.setName("卢本伟");
        citation.setStu(stu);
        //克隆
        Citation clone = citation.clone();
        System.out.println(clone.getStu() == citation.getStu());
        stu.setName("pdd");
        citation.show();
        clone.show();
    }
}
